package com.kdgz.kdgz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kdgz.kdgz.beans.Finance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author Veneno
 * @Desc
 * @date 2021/3/20
 */
@Mapper
public interface FinanceMapper extends BaseMapper<Finance> {
    @Select("select * from `finance` where year(date)= #{year}")
    public List<Finance> getFinanceByYear(Integer year);
    @Select("select * from `finance` where year(date)= #{year} and month(date)= #{month}")
    public Finance getFinanceByMonth(@Param("year") Integer year, @Param("month") Integer month);
}
